package com.jiuyou.clientController.homePage;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.system.service.IHomePageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/client/homePage")
public class ClientHomePageController extends BaseController {

    @Autowired
    private IHomePageService homePageService;

    /**
     * 企业数量
     */
    @GetMapping("/numberOfEnterprise")
    public AjaxResult numberOfEnterprise()
    {
        int num = homePageService.numberOfEnterprise();
        return  AjaxResult.success(num);
    }


    /**
     * 工程数量
     */
    @GetMapping("/numberOfEngineering")
    public AjaxResult numberOfEngineering()
    {
        int num = homePageService.numberOfEngineering();
        return  AjaxResult.success(num);
    }


    /**
     * 委托数量
     */
    @GetMapping("/numberOfCommission")
    public AjaxResult numberOfCommission()
    {
        int num = homePageService.numberOfCommission();
        return  AjaxResult.success(num);
    }

}
